Skip to content

chore: prepare for TypeScript 6.x#536

Merged
willeastcott merged 1 commit into
mainfrom
chore/typescript-6-prep
May 27, 2026
Merged

chore: prepare for TypeScript 6.x#536
willeastcott merged 1 commit into
mainfrom
chore/typescript-6-prep

Conversation

@willeastcott

@willeastcott willeastcott commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Make a future typescript@5.x^6.0.0 Renovate bump a trivial package.json change by clearing known friction points now, while still building cleanly on the current typescript@5.9.3.

  • tsconfig (both tsconfig.json and react/tsconfig.json): moduleResolution: "node""bundler" (matches how Rollup actually resolves modules and lets TS understand package.json exports, which pcui itself publishes). Add explicit strict: false so intent is unambiguous regardless of any future default changes.
  • @ts-ignore@ts-expect-error across 38 sites in 20 files. The expect-error form requires the line below it to actually produce a type error, so any future TS upgrade that fixes an underlying typing issue will fail loudly with "unused directive" instead of the suppression silently going dead. All 38 are doing real work on TS 5.9 today (verified by build:types).

Out of scope (no action needed):

  • @typescript-eslint@8.60, @rollup/plugin-typescript@12.3, typedoc@0.28.19, eslint@9.39 already on TS-6-compatible releases.
  • No deprecated compiler options in either tsconfig.
  • No namespace declarations, enums, triple-slash refs, module.exports, or import = require() syntax in source.

Test plan

Verified all six checks pass on typescript@5.9.3 with the changes applied:

  • npm run build:es6
  • npm run build:react:es6
  • npm run build:types
  • npm test (50/50)
  • npm run lint
  • npm run publint

When Renovate fires the TS 6 bump:

  • Re-run the same six commands.
  • git diff types/ to spot any consumer-visible .d.ts reorderings (TS 6.0 introduces opt-in --stableTypeOrdering).
  • Delete any @ts-expect-error comments that now report "unused directive" — that's the failure-loud signal this PR instruments.
  • Fall back to moduleResolution: "node16" if "bundler" causes unexpected import issues under 6.x (none anticipated).

🤖 Generated with Claude Code

Update tsconfig.json and react/tsconfig.json to use
`moduleResolution: "bundler"` (matches how Rollup actually resolves
modules and understands the `exports` field) and add an explicit
`strict: false` so intent is unambiguous regardless of future
default changes.

Convert all 38 `@ts-ignore` directives to `@ts-expect-error` across
20 files. `@ts-expect-error` requires the line below it to actually
produce a type error, so if a future TS release fixes any of the
underlying typing issues the build fails loudly with "unused
directive" instead of the suppression silently going dead.

All six checks (build:es6, build:react:es6, build:types, test, lint,
publint) pass on TS 5.9.3 with these changes applied.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@willeastcott willeastcott merged commit cbcadb5 into main May 27, 2026
5 checks passed
@willeastcott willeastcott deleted the chore/typescript-6-prep branch May 27, 2026 19:21
willeastcott added a commit that referenced this pull request May 27, 2026
Removes the `<6.0.0` cap on `typescript`. The prep landed in #536,
so TS 6 can ship as a regular Renovate bump.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant